$(function () {
    let SY_input = $(".SY-header .SY-search .SY-input");
    let search_Tip = $(".SY-header .SY-search .searchTips");
    let search_Result = $(".SY-header .SY-search .searchResult");
    let search_Referral = $(".SY-header .SY-search .searchReferral");
    //搜索框获取光标
    SY_input.focus(function (e) {
        $(this).parents(".inputField").addClass("active");
        search_Tip.show();
        if (SY_input.val().length <= 0) {
            search_Result.hide();
            search_Referral.show();
        }
        else {
            search_Result.show();
            search_Referral.hide()
        }
        e.stopPropagation();
    });
    search_Tip.click(function (e) {
        e.stopPropagation();
    });
    $(".inputField").click(function (e) {
        e.stopPropagation();
    });
    $(document).click(function () {
        $(this).parents(".inputField").removeClass("active");
        setTimeout(
            function () {
                search_Tip.hide()
            }, 200);
    });
    SY_input.on('input', function (e) {
        //alert('Changed!')
    });
});